<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding: 0;
        }
    </style>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        var canvas = document.getElementById("canvas");
        var width = height = window.innerWidth;
        canvas.width = width;
        canvas.height=height;
        var ctx = canvas.getContext("2d");

        var img = new Image();
        img.onload=function(){
            ctx.drawImage(img,94,94,187,187,0,0,187,187);
        }
        img.src="./src/img/1.jpg";
    </script>
</body>
</html>